package com.clip.entity;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;



public class ClipEvent implements java.io.Serializable {

	// Fields
	/**
	 * 当档期是发起邀请档期时,reliedclip=0,如果fuid>0,说明该发起档期有 源用户
	 * 
	 * */
	/**
	 * eventtype 区分 个人 与 商家
	 */
	private static final long serialVersionUID = -1049353999242729906L;
	private int id;
	private int uid;
	private Integer seid=0;//当为邀请档期是源头档期的eventid
	private String title;
	private String address;
	private String content;
	private Long begintime=0l;
	private Long endtime=0l;
	private Integer iswholeday=0;
	private Long invitetime=0l;
	
	private Long alerttime=0l;
	private Integer mobilenotice=0;
	private Integer eventtype=1;
	private Integer cliptype;
	
	private Long createtime=0l;
	private Long updatetime=0l;
	private Integer reliedclip=0;
	
	private Long deadlinetime=0l;
	
	private Integer isvip=0;
	
	private Integer status=0;
	
	private Integer processstatus=0;
	
	private Integer isread=0;
	
	private String shareid="";
	/** default constructor */
	public ClipEvent() {
	}

	// Property accessors

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getUid() {
		return this.uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Long getBegintime() {
		return begintime;
	}

	public void setBegintime(Long begintime) {
		this.begintime = begintime;
	}

	public Long getEndtime() {
		return endtime;
	}

	public void setEndtime(Long endtime) {
		this.endtime = endtime;
	}

	public Long getAlerttime() {
		return alerttime;
	}

	public void setAlerttime(Long alerttime) {
		this.alerttime = alerttime;
	}

	/**
	 * @return 0: 不使用手机通知
	 * 		   1: 使用手机通知
	 */
	public Integer getMobilenotice() {
		return mobilenotice;
	}

	/**
	 * @param mobilenotice 0: 不使用手机通知
	 * 		   			   1: 使用手机通知
	 */
	public void setMobilenotice(Integer mobilenotice) {
		this.mobilenotice = mobilenotice;
	}

	/**
	 * @return 	1:个人
	 * 			2:商家
	 */
	public Integer getEventtype() {
		return eventtype;
	}

	/**
	 * @param eventtype	1:个人
	 * 					2:商家
	 */
	public void setEventtype(Integer eventtype) {
		if(eventtype==0)
			eventtype=1;
		this.eventtype = eventtype;
	}

	/**
	 * @param cliptype 	1:私人档期
	 * 					2:纪念日
	 * 	 	 			3:找朋友档期
	 * 					4:求活动档期
	 */
	public Integer getCliptype() {
		return cliptype;
	}

	/**
	 * @param cliptype 	1:私人档期
	 * 					2:纪念日
	 * 	 	 			3:找朋友档期
	 * 					4:求活动档期
	 */
	public void setCliptype(Integer cliptype) {
		this.cliptype = cliptype;
	}

	public Long getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Long createtime) {
		this.createtime = createtime;
	}
	public Long getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Long updatetime) {
		this.updatetime = updatetime;
	}

	/**
	 * @return 	0:表示和其他事件无关联
	 * 			>0:表示参与的其他事件
	 */
	public Integer getReliedclip() {
		return reliedclip;
	}

	/**
	 * @param reliedclip 0:表示和其他事件无关联
	 * 					 >0:表示参与的其他事件
	 */
	public void setReliedclip(Integer reliedclip) {
		this.reliedclip = reliedclip;
	}

	public Long getDeadlinetime() {
		return deadlinetime;
	}

	public void setDeadlinetime(Long deadlinetime) {
		this.deadlinetime = deadlinetime;
	}

	/**
	 * @return 	0:不是重要
	 * 			1:重要
	 */
	public Integer getIsvip() {
		return isvip;
	}

	/**
	 * @param isvip 0:不是重要
	 * 				1:重要
	 */
	public void setIsvip(Integer isvip) {
		this.isvip = isvip;
	}

	/**
	 * @return 	0:未激活
	 * 			1:已激活
	 * 			2:已在回收站
	 */
	public Integer getStatus() {
		return status;
	}

	/**
	 * @param status	0:未激活
	 * 					1:已激活
	 * 					2:已在回收站
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}

	/**
	 * @return	0:进行中
	 * 			1:已结束
	 * 			2:已停止
	 */
	public Integer getProcessstatus() {
		return processstatus;
	}

	/**
	 * @param processstatus	0:进行中
	 * 						1:已结束
	 * 						2:已停止
	 */
	public void setProcessstatus(Integer processstatus) {
		this.processstatus = processstatus;
	}

	public Integer getIsread() {
		return isread;
	}

	public void setIsread(Integer isread) {
		this.isread = isread;
	}

	/**
	 * @return 	0: 不是单日事件
	 * 			1: 单日事件
	 */
	public Integer getIswholeday() {
		return iswholeday;
	}

	/**
	 * @param iswholeday	0: 不是单日事件
	 * 						1: 单日事件
	 */
	public void setIswholeday(Integer iswholeday) {
		this.iswholeday = iswholeday;
	}
	
	public String getShareid() {
		return shareid;
	}

	public void setShareid(String shareid) {
		this.shareid = shareid;
	}

	public Integer getSeid() {
		return seid;
	}

	public void setSeid(Integer seid) {
		this.seid = seid;
	}

	public Long getInvitetime() {
		return invitetime;
	}

	public void setInvitetime(Long invitetime) {
		this.invitetime = invitetime;
	}

	@Deprecated
	public static Integer eventtypeStr2Int(String str){
		if(str.equals("other")){
			return 1;
		}else if(str.equals("work")){
			return 2;
		}else if(str.equals("socal")){
			return 3;
		}else if(str.equals("sect")){
			return 4;
		}else{
			return 0;
		}
	}

	@Deprecated
	public static String eventtypeInt2Str(Integer typeint){
		String str="";
		switch (typeint) {
		case 1:
			str="other";
			break;
		case 2:
			str="work";
			break;
		case 3:
			str="socal";
			break;
		case 4:
			str="sect";
			break;
		default:
			break;
		}
		return str;
	}

	public Object clone(){
		Object obj=null;
		try {
			ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
			ObjectOutputStream out= new ObjectOutputStream(byteOut);
			out.writeObject(this);
			ByteArrayInputStream byteIn = new ByteArrayInputStream(byteOut.toByteArray());
			ObjectInputStream in =new ObjectInputStream(byteIn);
			obj = in.readObject();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		return obj;
	}
	
	
}